POV-Ray : Newsgroups : povray.general : Image maps and textures : Re: Image maps and textures Server Time
12 Aug 2024 13:24:16 EDT (-0400)
  Re: Image maps and textures  
From: Bob Hughes
Date: 10 Feb 1999 18:29:39
Message: <36C2163E.A83A6C44@aol.com>
To further enhance upon this hopefully, you can apply filtering or
tranmitting to larger amounts of the image_map by using a #while loop to
increase the number of palette index numbers used and can also vary the
filter value too. Many variations of this can be done. Hope this
somewhat thrifty example shows you the idea well enough. Beware, I had
to cancel this message once already because I left out the #end of the
loop.

#declare C=192; //starting palette index number
#declare FA=1; //starts with full filtering

texture {YourUnderlyingTexture}
texture {
 pigment{
  image_map{
   gif "MyImage.gif"
    interpolate 2
 #while (C>127) //ending palette index number
   filter PN,FA
 #declare PN=C; //palette index number
 #declare FA=FA-((192-C)/64); //filter value, based upon start/end
 #declare C=C-1; //countdown [integers only]
 #end
  }
 }
}

Please note that a custom palette or one ordered in some way makes for
better control than a mix and match kind, in which case a 24-bit targa
is a better candidate due to the palettelessness and should be more
color-based as seen in the picture.



Ken wrote:
> 
> Chris Field wrote:
> >
> > I was wondering if it was possible to overlay an image map on an object that
> > already has a texture.
> > can you make the image map transparent in parts and put it on top of a
> > texture so that the texture shows through?
> > any help greatly appreciated.
> >
> > Chris.
> 
> Yes it is possible. Read up in the docs on filter/transimit for
> image maps. Basicaly you need to make the image_map's background
> a single filterable color. You also need to know what the pallet
> index for that color is. You could also specifiy a filter all
> value if you prefer.
> 
> If I recall correctly the syntax for filtering a single color in a
> image map is:
> 
> pigment{
>  image_map{
>   gif "MyImage.gif
>    interpolate 2
>   filter 255,1
>  }
> }
> 
> The first number is the pallet index number for the backgound color
> ( I have choosen 255 = white for this example) and the second is the
> filter amount. I may have that backward so check the docs. You can
> also specify a transmit amount the same way. It's best to use .gif
> files for this if possible because it uses a 256 color pallet for the
> image which is compatible with the pov syntax for the feature.
> 
> --
> Ken Tyler
> 
> mailto://tylereng@pacbell.net

-- 
 omniVERSE: beyond the universe
  http://members.aol.com/inversez/POVring.htm
 mailto:inv### [at] aolcom?PoV


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.